
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8"/>
    <title>IconFont</title>
    <link rel="stylesheet" href="demo.css">
    <script src="iconfont.js"></script>

    <style type="text/css">
        .icon {
          /* 通过设置 font-size 来改变图标大小 */
          width: 1em; height: 1em;
          /* 图标和文字相邻时，垂直对齐 */
          vertical-align: -0.15em;
          /* 通过设置 color 来改变 SVG 的颜色/fill */
          fill: currentColor;
          /* path 和 stroke 溢出 viewBox 部分在 IE 下会显示
             normalize.css 中也包含这行 */
          overflow: hidden;
        }

    </style>
</head>
<body>
    <div class="main markdown">
        <h1>IconFont 图标</h1>
        <ul class="icon_lists clear">
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#ZMPageIcon-guanbi"></use>
                    </svg>
                    <div class="name">关闭</div>
                    <div class="fontclass">#ZMPageIcon-guanbi</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#ZMPageIcon-user02"></use>
                    </svg>
                    <div class="name">user02</div>
                    <div class="fontclass">#ZMPageIcon-user02</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#ZMPageIcon-shouqishang"></use>
                    </svg>
                    <div class="name">收起，上</div>
                    <div class="fontclass">#ZMPageIcon-shouqishang</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#ZMPageIcon-fanhuizuo"></use>
                    </svg>
                    <div class="name">返回，左</div>
                    <div class="fontclass">#ZMPageIcon-fanhuizuo</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#ZMPageIcon-jinruyou"></use>
                    </svg>
                    <div class="name">进入，右</div>
                    <div class="fontclass">#ZMPageIcon-jinruyou</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#ZMPageIcon-zhankaixia"></use>
                    </svg>
                    <div class="name">展开，下</div>
                    <div class="fontclass">#ZMPageIcon-zhankaixia</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#ZMPageIcon-shezhi"></use>
                    </svg>
                    <div class="name">设置</div>
                    <div class="fontclass">#ZMPageIcon-shezhi</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#ZMPageIcon-chenggong"></use>
                    </svg>
                    <div class="name">成功</div>
                    <div class="fontclass">#ZMPageIcon-chenggong</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#ZMPageIcon-fanhui"></use>
                    </svg>
                    <div class="name">返回</div>
                    <div class="fontclass">#ZMPageIcon-fanhui</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#ZMPageIcon-shuaxin"></use>
                    </svg>
                    <div class="name">刷新</div>
                    <div class="fontclass">#ZMPageIcon-shuaxin</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#ZMPageIcon-guanbi1"></use>
                    </svg>
                    <div class="name">关闭</div>
                    <div class="fontclass">#ZMPageIcon-guanbi1</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#ZMPageIcon-changyonggoupiaorenbianji"></use>
                    </svg>
                    <div class="name">常用购票人／编辑32</div>
                    <div class="fontclass">#ZMPageIcon-changyonggoupiaorenbianji</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#ZMPageIcon-youxiang"></use>
                    </svg>
                    <div class="name">邮箱</div>
                    <div class="fontclass">#ZMPageIcon-youxiang</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#ZMPageIcon-icon-test"></use>
                    </svg>
                    <div class="name">其他</div>
                    <div class="fontclass">#ZMPageIcon-icon-test</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#ZMPageIcon-icon-test1"></use>
                    </svg>
                    <div class="name">更多</div>
                    <div class="fontclass">#ZMPageIcon-icon-test1</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#ZMPageIcon-xiaoxi"></use>
                    </svg>
                    <div class="name">消息</div>
                    <div class="fontclass">#ZMPageIcon-xiaoxi</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#ZMPageIcon-shuju"></use>
                    </svg>
                    <div class="name">数据</div>
                    <div class="fontclass">#ZMPageIcon-shuju</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#ZMPageIcon-wang"></use>
                    </svg>
                    <div class="name">网</div>
                    <div class="fontclass">#ZMPageIcon-wang</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#ZMPageIcon-shuju1"></use>
                    </svg>
                    <div class="name">数据2</div>
                    <div class="fontclass">#ZMPageIcon-shuju1</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#ZMPageIcon-shuju2"></use>
                    </svg>
                    <div class="name">数据3</div>
                    <div class="fontclass">#ZMPageIcon-shuju2</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#ZMPageIcon-yun"></use>
                    </svg>
                    <div class="name">云</div>
                    <div class="fontclass">#ZMPageIcon-yun</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#ZMPageIcon-shoucang"></use>
                    </svg>
                    <div class="name">收藏</div>
                    <div class="fontclass">#ZMPageIcon-shoucang</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#ZMPageIcon-lajixiang"></use>
                    </svg>
                    <div class="name">垃圾箱</div>
                    <div class="fontclass">#ZMPageIcon-lajixiang</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#ZMPageIcon-wenjian"></use>
                    </svg>
                    <div class="name">文件</div>
                    <div class="fontclass">#ZMPageIcon-wenjian</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#ZMPageIcon-chucun"></use>
                    </svg>
                    <div class="name">储存</div>
                    <div class="fontclass">#ZMPageIcon-chucun</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#ZMPageIcon-qia"></use>
                    </svg>
                    <div class="name">卡</div>
                    <div class="fontclass">#ZMPageIcon-qia</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#ZMPageIcon-qian"></use>
                    </svg>
                    <div class="name">钱</div>
                    <div class="fontclass">#ZMPageIcon-qian</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#ZMPageIcon-sousuo"></use>
                    </svg>
                    <div class="name">搜索</div>
                    <div class="fontclass">#ZMPageIcon-sousuo</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#ZMPageIcon-shuju3"></use>
                    </svg>
                    <div class="name">数据5</div>
                    <div class="fontclass">#ZMPageIcon-shuju3</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#ZMPageIcon-shezhi1"></use>
                    </svg>
                    <div class="name">设置</div>
                    <div class="fontclass">#ZMPageIcon-shezhi1</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#ZMPageIcon-zhuye"></use>
                    </svg>
                    <div class="name">主页</div>
                    <div class="fontclass">#ZMPageIcon-zhuye</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#ZMPageIcon-WIFI"></use>
                    </svg>
                    <div class="name">WIFI</div>
                    <div class="fontclass">#ZMPageIcon-WIFI</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#ZMPageIcon-kafei"></use>
                    </svg>
                    <div class="name">咖啡</div>
                    <div class="fontclass">#ZMPageIcon-kafei</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#ZMPageIcon-yinle"></use>
                    </svg>
                    <div class="name">音乐</div>
                    <div class="fontclass">#ZMPageIcon-yinle</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#ZMPageIcon-dizhi"></use>
                    </svg>
                    <div class="name">地址</div>
                    <div class="fontclass">#ZMPageIcon-dizhi</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#ZMPageIcon-xiazai"></use>
                    </svg>
                    <div class="name">下载</div>
                    <div class="fontclass">#ZMPageIcon-xiazai</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#ZMPageIcon-buju"></use>
                    </svg>
                    <div class="name">布局</div>
                    <div class="fontclass">#ZMPageIcon-buju</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#ZMPageIcon-shuaxin1"></use>
                    </svg>
                    <div class="name">刷新</div>
                    <div class="fontclass">#ZMPageIcon-shuaxin1</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#ZMPageIcon-shezhi2"></use>
                    </svg>
                    <div class="name">设置1</div>
                    <div class="fontclass">#ZMPageIcon-shezhi2</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#ZMPageIcon-dun"></use>
                    </svg>
                    <div class="name">盾</div>
                    <div class="fontclass">#ZMPageIcon-dun</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#ZMPageIcon-dianhua"></use>
                    </svg>
                    <div class="name">电话</div>
                    <div class="fontclass">#ZMPageIcon-dianhua</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#ZMPageIcon-xuanze"></use>
                    </svg>
                    <div class="name">选择</div>
                    <div class="fontclass">#ZMPageIcon-xuanze</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#ZMPageIcon-shangchuan"></use>
                    </svg>
                    <div class="name">上传</div>
                    <div class="fontclass">#ZMPageIcon-shangchuan</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#ZMPageIcon-guanlian"></use>
                    </svg>
                    <div class="name">关联</div>
                    <div class="fontclass">#ZMPageIcon-guanlian</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#ZMPageIcon-xuanze1"></use>
                    </svg>
                    <div class="name">选择1</div>
                    <div class="fontclass">#ZMPageIcon-xuanze1</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#ZMPageIcon-shandian"></use>
                    </svg>
                    <div class="name">闪电</div>
                    <div class="fontclass">#ZMPageIcon-shandian</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#ZMPageIcon-jinbi"></use>
                    </svg>
                    <div class="name">金币</div>
                    <div class="fontclass">#ZMPageIcon-jinbi</div>
                </li>
            
        </ul>


        <h2 id="symbol-">symbol引用</h2>
        <hr>

        <p>这是一种全新的使用方式，应该说这才是未来的主流，也是平台目前推荐的用法。相关介绍可以参考这篇<a href="">文章</a>
        这种用法其实是做了一个svg的集合，与另外两种相比具有如下特点：</p>
        <ul>
          <li>支持多色图标了，不再受单色限制。</li>
          <li>通过一些技巧，支持像字体那样，通过<code>font-size</code>,<code>color</code>来调整样式。</li>
          <li>兼容性较差，支持 ie9+,及现代浏览器。</li>
          <li>浏览器渲染svg的性能一般，还不如png。</li>
        </ul>
        <p>使用步骤如下：</p>
        <h3 id="-symbol-">第一步：引入项目下面生成的symbol代码：</h3>
        <pre><code class="lang-js hljs javascript"><span class="hljs-comment">&lt;script src="./iconfont.js"&gt;&lt;/script&gt;</span></code></pre>
        <h3 id="-css-">第二步：加入通用css代码（引入一次就行）：</h3>
        <pre><code class="lang-js hljs javascript">&lt;style type=<span class="hljs-string">"text/css"</span>&gt;
.icon {
   width: <span class="hljs-number">1</span>em; height: <span class="hljs-number">1</span>em;
   vertical-align: <span class="hljs-number">-0.15</span>em;
   fill: currentColor;
   overflow: hidden;
}
&lt;<span class="hljs-regexp">/style&gt;</span></code></pre>
        <h3 id="-">第三步：挑选相应图标并获取类名，应用于页面：</h3>
        <pre><code class="lang-js hljs javascript">&lt;svg <span class="hljs-class"><span class="hljs-keyword">class</span></span>=<span class="hljs-string">"icon"</span> aria-hidden=<span class="hljs-string">"true"</span>&gt;<span class="xml"><span class="hljs-tag">
  &lt;<span class="hljs-name">use</span> <span class="hljs-attr">xlink:href</span>=<span class="hljs-string">"#ZMPageIcon-xxx"</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">use</span>&gt;</span>
</span>&lt;<span class="hljs-regexp">/svg&gt;
        </span></code></pre>
    </div>
</body>
</html>
